﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Pg.BioMedics.SDR.Entities;
using Pg.BioMedics.SDR.Web.Controls;
using Pg.BioMedics.SDR.Web.Constants;

public partial class Administration_Views_FinishRegisterView : BaseHostedView
{
    #region Fields

    private Person person;

    #endregion

    #region Event handlers

    protected override void LoadParameters(object[] parameters)
    {
        this.person = parameters.FirstOrDefault() as Person;
    }

    protected void setPasswordLinkButton_Click(object sender, EventArgs e)
    {
        base.Navigate(UsersManagementViews.SetPasswordView, UsersManagementViews.PersonDetailsView, this.person);
    }

    protected void returnLinkButton_Click(object sender, EventArgs e)
    {
        base.Return(this.person);
    }

    #endregion

    #region Overriden methods

    protected override object SaveViewModel()
    {
        return this.person;

    }

    protected override void LoadViewModel(object savedModel)
    {
        if (savedModel != null)
            this.person = savedModel as Person;
    }

    #endregion   
}
